package com.sanqi.work.service.impl;

import java.util.List;
import com.sanqi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sanqi.work.mapper.WorkScoringConfMapper;
import com.sanqi.work.domain.WorkScoringConf;
import com.sanqi.work.service.IWorkScoringConfService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 绩效考核配置Service业务层处理
 * 
 * @author duany
 * @date 2025-09-30
 */
@Service
public class WorkScoringConfServiceImpl extends ServiceImpl<WorkScoringConfMapper, WorkScoringConf> implements IWorkScoringConfService 
{
    @Autowired
    private WorkScoringConfMapper workScoringConfMapper;

    /**
     * 查询绩效考核配置
     * 
     * @param id 绩效考核配置主键
     * @return 绩效考核配置
     */
    @Override
    public WorkScoringConf selectWorkScoringConfById(String id)
    {
        return workScoringConfMapper.selectWorkScoringConfById(id);
    }

    /**
     * 查询绩效考核配置列表
     * 
     * @param workScoringConf 绩效考核配置
     * @return 绩效考核配置
     */
    @Override
    public List<WorkScoringConf> selectWorkScoringConfList(WorkScoringConf workScoringConf)
    {
        return workScoringConfMapper.selectWorkScoringConfList(workScoringConf);
    }

    /**
     * 新增绩效考核配置
     * 
     * @param workScoringConf 绩效考核配置
     * @return 结果
     */
    @Override
    public int insertWorkScoringConf(WorkScoringConf workScoringConf)
    {
        return save(workScoringConf) ? 1 : 0;
    }

    /**
     * 修改绩效考核配置
     * 
     * @param workScoringConf 绩效考核配置
     * @return 结果
     */
    @Override
    public int updateWorkScoringConf(WorkScoringConf workScoringConf)
    {
        return updateById(workScoringConf) ? 1 : 0;
    }

    /**
     * 批量删除绩效考核配置
     * 
     * @param ids 需要删除的绩效考核配置主键
     * @return 结果
     */
    @Override
    public int deleteWorkScoringConfByIds(String[] ids)
    {
        return workScoringConfMapper.deleteWorkScoringConfByIds(ids);
    }

    /**
     * 删除绩效考核配置信息
     * 
     * @param id 绩效考核配置主键
     * @return 结果
     */
    @Override
    public int deleteWorkScoringConfById(String id)
    {
        return workScoringConfMapper.deleteWorkScoringConfById(id);
    }
}
